package com.boboPlanet.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.boboPlanet.comm.entity.po.LoginDetailInfoPO;
import com.boboPlanet.comm.entity.po.LoginUserInfoPO;
import com.boboPlanet.user.entity.dto.UpdateUserInfoDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Description: TODO
 * @Author: mis_wu
 * @Date: 2023/2/15
 **/
@Mapper
public interface UserDetailOperationMapper extends BaseMapper<LoginDetailInfoPO> {

    /**
     * 更新用户信息
     * @param dto UpdateUserInfoDTO
     * @return boolean
     */
    boolean updateUserInfoById(@Param("dto") UpdateUserInfoDTO dto);

    LoginDetailInfoPO queryUserDetailInfoById(@Param("userId") Long userId);

    boolean updateUserAvatarById(@Param("userId") Long userId,@Param("url") String url,@Param("fileName") String fileName);

    String queryAvatarUrlById(@Param("userId") Long userId);
}
